<?php
@session_start();
$db = new Libs_Database();
if (!isset($_SESSION['user'])) {
//    header("location: login.php");
}
?>
<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <meta charset="UTF-8">
        <title>Admin Dashboard</title>
        <?php
        include_once 'templates/render.php';
        $render = new render();
        $arrFileCSS = array(
            'style.css',
            'ui-lightness/jquery-ui-1.10.4.min.css'
        );
        $render->renderCSS('admin', $arrFileCSS);
        $arrFileJS = array(
            'jquery.js',
            'ajax.js',
            'jquery-ui-1.10.4.min.js',
            'custom.js',
            'ckeditor/ckeditor.js',
            'ckfinder/ckfinder.js'
        );
        $render->renderJS('admin', $arrFileJS);
        ?>
        <script>
            $(function() {
                $(".datepicker").datepicker({
                    dateFormat: "dd/mm/yy"
                });
            });
        </script>
    </head>
    <body>
        <div id="wrap">
            <div id="header">
                <nav id="menu">
                    <ul>
                        <li>
                            <a href="<?php echo URL_BASE . '/admin'; ?>">Trang chủ</a>
                            <!--                            <ul>
                                                            <li><a href="#">Submenu 1</a></li>
                                                            <li><a href="#">Submenu 2</a></li>
                                                            <li><a href="#">Submenu 3</a></li>
                                                            <li><a href="#">Submenu 4</a></li>
                                                            <li><a href="#">Submenu 5</a></li>
                                                            <li><a href="#">Submenu 6</a></li>
                                                        </ul>-->
                        </li>
                        <li class="lr">
                            Xin chào, <?php echo $_SESSION['user_email']; ?>. <a href="<?php echo URL_BASE; ?>/admin/user/logout">Thoát</a>
                        </li>
                        <li>
                            <a href="<?php echo URL_BASE . '/admin/user'; ?>">Đổi mật khẩu</a>
                        </li>
                    </ul>
                </nav>
                <div id="logo">
                    <h1>Gstore Dashboard</h1>
                </div>
            </div>